﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Hotel.Models.DataAccess;
using Hotel.Models.Entity;

namespace Hotel.Models.Services
{
    public class CustomerService
    {
        public static List<Customer> GetListCustomer()
        {
            return DACustomer.GetListCustomer(0);
        }

        public static Customer GetDetailCustomer(int cusID)
        {
            return DACustomer.GetListCustomer(cusID)[0];
        }

        public static bool DeleteCustomer(int cusID)
        {
            return DACustomer.DeleteCustomer(cusID);
        }

        //Insert : isUpdate = false
        //Update : isUpdate = true
        public static bool SaveCustomer(Customer cus, bool isUpdate)
        {
            return DACustomer.SaveCustomer(cus, isUpdate);
        }
    }
}